package com.management.service.Impl;

/**
 * @category:
 * @author: cwsheng
 * @version: 1.0
 * @date: 2021/10/29 9:53
 *仓库数据业务逻辑访问实现类
 */
import com.management.dao.WarehouseDao;
import com.management.po.Warehouse;


import com.management.service.WarehouseService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;

@Service
public class WarehouseServiceImpl implements WarehouseService {
    @Resource
    WarehouseDao warehouseDao;
    @Override
    public List<Warehouse> findAll() {
        return warehouseDao.findAll();
    }

    @Override
    public List<Warehouse> findByCompanyId(int companyId) {
        return warehouseDao.findByCompanyId(companyId);
    }

    @Override
    public Warehouse findByWarehouseId(int warehouseId) {
        return warehouseDao.findByWarehouseId(warehouseId);
    }

    @Override
    public boolean add(Warehouse warehouse) {
        return warehouseDao.add(warehouse)>0?true:false;
    }

    @Override
    public boolean update(Warehouse warehouse) {
        return false;
    }
}
